# -*- coding: utf-8 -*-

def FindNext(m, record, r, c):
    